﻿

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using CommonTagTime.DataAccess;
using CommonTagTime.ModelObject;
namespace CommonTagTime.Business
{
    public class busLocation
    {
        //------------------------------------------------
        //FIELD TABLE
        //------------------------------------------------

        public const string LocationId = "LocationId";
        public const string SortOrder = "SortOrder";
        public const string Name = "Name";
        public const string IsActive = "IsActive";
        public const string CreatedBy = "CreatedBy";
        public const string CreatedDate = "CreatedDate";
        public const string ModifiedBy = "ModifiedBy";
        public const string ModifiedDate = "ModifiedDate";


        public const string ORDERBY = "OrderBy";
        public const string ORDERDIRECTION = "OrderDirection";
        public const string CURRENTPAGE = "CurrentPage";
        public const string PAGESIZE = "PageSize";
        public const string TOTALRECORDS = "TotalRecords";
        public const string CONDITION = "Condition";


        private daoLocation _daoLocation;
        //------------------------------------------------
        //PUBLIC
        //------------------------------------------------
        public busLocation()
        {
            _daoLocation = new daoLocation();
        }
        public Location GetByID(int locationId)
        {
            return _daoLocation.GetByID(locationId);
        }
        public LocationCollection GetAll()
        {
            return _daoLocation.GetAll();
        }
        public bool Insert(Location objLocation)
        {
            return _daoLocation.Insert(objLocation);
        }
        public bool Update(Location objLocation)
        {
            return _daoLocation.Update(objLocation);
        }
        public bool DeActive(int locationId)
        {
            return _daoLocation.DeActive(locationId);
        }
        public bool Active(int locationId)
        {
            return _daoLocation.Active(locationId);
        }
        public bool OrderDown(int locationId)
        {
            return _daoLocation.OrderDown(locationId);
        }
        public bool OrderUp(int locationId)
        {
            return _daoLocation.OrderUp(locationId);
        }
        public LocationCollection List()
        {
            return _daoLocation.List();
        }
        public bool Delete(int locationId)
        {
            return _daoLocation.Delete(locationId);
        }
    }

}